package com.kun.entity;

import java.util.Date;
import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;

@SuppressWarnings("serial")
public class User implements java.io.Serializable{
    private String id;

    private String username;

    @JSONField(serialize=false)
    private String password;

    private String nickname;

    private String realname;

    private Long deposit;

    private String idcard;

    private String phone;

    private String wechat;

    private String email;

    private String headImg;

    private String sign;

    private String sex;

    @JSONField(format="yyyy-MM-dd")
    private Date birthday;

    private String address;

    private Integer integral;

    @JSONField(serialize=false)
    private String salt;

    @JSONField(format="yyyy-MM-dd")
    private Date regDate;

    @JSONField(format="yyyy-MM-dd")
    private Date lastLogDate;

    private Integer state;

    private Integer level;
    
    private Integer authProcess;
    
    private List<Role> roleList;
    
    private List<Permission> permissionList;

    //layui分页参数
    public String getSexName(){
    	if("0".equals(sex)){
    		return "女";
    	}else if("1".equals(sex)){
    		return "男";
    	}
    	return "";
    }
    
    public List<Role> getRoleList() {
		return roleList;
	}

	public void setRoleList(List<Role> roleList) {
		this.roleList = roleList;
	}

	public List<Permission> getPermissionList() {
		return permissionList;
	}

	public void setPermissionList(List<Permission> permissionList) {
		this.permissionList = permissionList;
	}

	public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname == null ? null : nickname.trim();
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname == null ? null : realname.trim();
    }

    public Long getDeposit() {
        return deposit;
    }

    public void setDeposit(Long deposit) {
        this.deposit = deposit;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard == null ? null : idcard.trim();
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat == null ? null : wechat.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg == null ? null : headImg.trim();
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign == null ? null : sign.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public Integer getIntegral() {
        return integral;
    }

    public void setIntegral(Integer integral) {
        this.integral = integral;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt == null ? null : salt.trim();
    }

    public Date getRegDate() {
        return regDate;
    }

    public void setRegDate(Date regDate) {
        this.regDate = regDate;
    }

    public Date getLastLogDate() {
        return lastLogDate;
    }

    public void setLastLogDate(Date lastLogDate) {
        this.lastLogDate = lastLogDate;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }
    
    public Integer getAuthProcess() {
        return authProcess;
    }

    public void setAuthProcess(Integer authProcess) {
        this.authProcess = authProcess;
    }
    
    @Override
	public String toString() {
		return "User [id=" + id + ", username=" + username + ", password=" + password + ", realname=" + realname
				+ ", phone=" + phone + ", wechat=" + wechat + ", email=" + email + ", headImg=" + headImg + ", sign="
				+ sign + ", sex=" + sex + ", birthday=" + birthday + ", address=" + address + ", integral=" + integral
				+ ", salt=" + salt + ", regDate=" + regDate + ", lastLogDate=" + lastLogDate + ", state=" + state + "]";
	}
}